def countPrefixes(words: list,s: str):
    count = 0
    for word in words:
        if s.startswith(word):
            count += 1
    return count

print(countPrefixes(['a','b','c','ab','bc','abc'],'abc'))